home *** CD-ROM | disk | FTP | other *** search
/ Shareware Super Platinum 8 / Shareware Super Platinum 8.iso / mac / PROGTOOL / GWMALLOC.ZIP;1 / GWMALLOC.TAR / gw_malloc / configure.in < prev    next >
Encoding:
Text File  |  1993-04-08  |  1.7 KB  |  75 lines

  1. dnl
  2. dnl Process this file with autoconf to produce a configure script.
  3. dnl Copyright 1992 by Gray Watson and the Antaire Corporation
  4. dnl
  5. AC_INIT(malloc.c)
  6. AC_CONFIG_HEADER(conf.h)
  7. dnl
  8. echo Configuring for the malloc-debug library
  9. echo .
  10. echo checking programs:
  11. AC_PROG_CC
  12. AC_PROG_INSTALL
  13. AC_PROG_RANLIB
  14. dnl
  15. echo .
  16. echo checking functions:
  17. AC_HAVE_FUNCS(bcmp bcopy memcmp memcpy memset)
  18. dnl this is necessary because index is a m4 function
  19. echo checking for _index
  20. AC_TEST_PROGRAM([
  21. main() { exit(0); }
  22. t() {
  23. #ifdef __stub_index
  24. choke me
  25. #else
  26. /* Override any gcc2 internal prototype to avoid an error.  */
  27. extern char index(); index();
  28. #endif
  29.  }
  30. ], [
  31. AC_DEFINE(HAVE_INDEX, 1)
  32. ], [
  33. AC_DEFINE(HAVE_INDEX, 0)
  34. ])
  35. AC_HAVE_FUNCS(rindex)
  36. AC_HAVE_FUNCS(strcat strcmp strlen strtok)
  37. echo .
  38. echo checking various functions for string checking
  39. AC_HAVE_FUNCS(bzero)
  40. AC_HAVE_FUNCS(memccpy memchr)
  41. AC_HAVE_FUNCS(strchr strrchr strcpy strncpy strcasecmp strncasecmp)
  42. AC_HAVE_FUNCS(strspn strcspn strncat strncmp strpbrk strstr)
  43. dnl
  44. echo .
  45. echo PLEASE WATCH: checking for very important functionality:
  46. AC_HAVE_FUNCS(sbrk)
  47. echo checking for heap ordering...
  48. AC_TEST_PROGRAM([
  49. main()
  50. {
  51.   char    * first, *next;
  52.   first = sbrk(1024);
  53.   next = sbrk(1024);
  54.   if (next > first)
  55.     exit(0);
  56.   else
  57.     exit(1);
  58. }
  59. ], [
  60. AC_DEFINE(HEAP_GROWS_UP, 1)
  61. echo '   FYI: your heap seems to grow up.'
  62. ], [
  63. AC_DEFINE(HEAP_GROWS_UP, 0)
  64. echo '   FYI: your heap seems to grow down.'
  65. echo '   WARNING: the library has little support for this.'
  66. ])
  67. dnl
  68. echo .
  69. AC_OUTPUT(Makefile)
  70. echo .
  71. echo Done!!
  72. echo created conf.h and Makefile.
  73. echo Please check-out Makefile and especially conf.h to make sure that
  74. echo     sane configuration values were a result.
  75.